﻿using System;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Web;
using SF.Common;
using System.Text.RegularExpressions;

namespace SF.Web.UI
{
    public class HtmlBuilder
    {
        Model.siteconfig config = new BLL.siteconfig().loadConfig();//站点配置
        private const string urlstr = "\"{0}tools/admin_ajax.ashx?action=get_builder_html&lang={1}&html_filename=&indexy=&aspx_filename={2}&catalogue={3}\"";

        protected internal Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
        public HtmlBuilder()
        {
            //构造函数
        }


        /// <summary>
        /// 计算分页数量
        /// </summary>
        /// <param name="totalCount"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        private int GetPageSize(int totalCount, int pageSize)
        {
            //计算页数
            if (totalCount < 1 || pageSize < 1)
            {
                return 1;
            }
            int pageCount = totalCount / pageSize;
            if (pageCount < 1)
            {
                return 1;
            }
            if (totalCount % pageSize > 0)
            {
                return (pageCount += 1);
            }
            else {
                if (totalCount % pageSize == 0)
                    return pageCount;
            }
            if (pageCount <= 1)
            {
                return 1;
            }
            return 1;
        }


    }
}
